<!--
 * @Author: your name
 * @Date: 2020-03-13 16:02:28
 * @LastEditTime: 2020-03-27 13:09:25
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-imooc-ebook\src\App.vue
 -->
<template>
<div id="app">
  <!-- <span class="text">ABCDE</span> -->
  <router-view/>
</div>
</template>

<script>
import * as url from './api'
export default {
  // created() {
  //   this.$axios({
  //     url: url.BOOKLIST,
  //     method: 'get'
  //   }).then(data => {
  //     console.log(data)
  //   }).catch(err => {
  //     console.log(err)
  //   })
  // }
}
// 设置rem
document.addEventListener('DOMContentLoader', () => {
  const html = document.querySelector('html')// 获取根元素
  let fontSize = window.innerWidth / 10
  fontSize = fontSize > 50 ? 50 : fontSize // 不超过50，防止字体过大
  html.style.fontSize = fontSize + 'px'
})
</script>

<style lang="scss" scoped>
@import './assets/styles/global';
// .text{
//   font-family: 'Days One';
//   font-size: 1rem;
//   color:orange;
// }
#app{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    background: #7d8188;
    overflow: hidden;
}
</style>
